<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <link rel="icon" href="/favicon.ico">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>预览</title>
  <link rel="stylesheet" href="https://demo.xingyunzuo.com/style.css">

  <script src="https://demo.xingyunzuo.com/require.js"></script>
</head>

<body>
  <div id="app"></div>
  <script>
    const reportId = 'designer-nebulaSampleReportId'
    //组件配置
    require(["https://demo.xingyunzuo.com/index.umd.js"], function (NebularRendererPC) {

      const rawConfig = localStorage.getItem(reportId)
      let configJson = rawConfig != null ? JSON.parse(JSON.parse(rawConfig).value) : null

      if(configJson == null)
       return

      const config = {
        configJson: configJson
      }
      //实例化
      const stage = new NebularRendererPC(config);
      //初始化数据
      console.log("init", stage);
      stage.loadData();
    });

  </script>
</body>
<style>
  #app {
    margin: 0;
    padding: 0;
    min-height: 100vh;
  }
</style>

</html>